package org.foxas.map
{
	import flash.display.Sprite;
	
	import org.foxas.base.FGeom;

	public class FMapGrid extends Sprite
	{
		public var size:int;
		public var row:int;
		public var col:int;
		public function FMapGrid(_state:int,_size:int,_x:int,_y:int)
		{
			super();
			this.size = _size;
			this.x = _x;
			this.y = _y;
			this.state=_state;
		}
		public function set state(_state:int):void{
			var _color:int;
			if(_state==0){
				_color = 0xFFFFFF;
			}else if(_state==1){
				_color = 0x666666;
			}else if(_state==2){
				_color = 0x00FF00;
			}else if(_state==4){
				_color = 0x0000FF;
			}else if(_state==6){
				_color = 0xFF0000;
			}else if(_state==9){
				_color = 0xFF55FF;
			}
			FGeom.DrawRect(this,0,0,this.size,this.size,_color,0.8,0,0.2);
		}
	}
}